package com.qf.flash.ui.home.adapter;

import android.view.View;

import com.qf.flash.R;
import com.qf.flash.model.RegionBean;
import com.qf.flashlib.adapter.BaseRViewItem;
import com.qf.flashlib.adapter.RViewHolder;

/**
 * 描述:
 * 2020/4/23 17:37
 */
public class AreaChosenItem extends BaseRViewItem<RegionBean> {
    @Override
    public int getItemLayout() {
        return R.layout.item_area_chosen;
    }

    @Override
    public void convert(RViewHolder holder, RegionBean entity, int position, int itemSize) {
        holder.setText(R.id.tv_name, entity.getName());
        View view = holder.getView(R.id.iv_chosen);
        view.setVisibility(position == holder.getAdapter().getSingleChosenPosition() ? View.VISIBLE : View.GONE);
    }
}
